package com.power.service;

import com.power.ov.ResultDataTable;
import com.power.pojo.Defect;
import com.power.pojo.Inspetion;

import java.sql.SQLException;

/**
 * Created with IntelliJ IDEA.
 * User: 李辽
 * Date: 2020/10/09 10:56
 * Description:
 * Version: V1.0
 */
public interface inspeService {
    /**
     * 查询所有的巡检信息
     * @param page
     * @param limit
     * @return
     */
    ResultDataTable QueryListInspection(int page, int limit) throws SQLException;

    /**
     * 添加巡检信息
     * @param inspetion
     * @return
     */
    int AddInspetion(Inspetion inspetion) throws SQLException;

    /**
     * 查询所有巡检信息，给select中option赋值
     * @return
     */
    ResultDataTable ShowSelectInspection() throws SQLException;

    /**
     * 查询所有状态信息，给select中option赋值
     * @return
     */
    ResultDataTable ShowSelectState() throws SQLException;

    /**
     * 通过任务编号、线路编号、任务状态id查询巡检任务信息
     * @param task_id 任务编号
     * @param line_number 线路编号
     * @param state_id 任务状态id
     * @return
     */
    ResultDataTable SearchInspection(String task_id, String line_number, int state_id) throws SQLException;

    /**
     * 更改巡检信息内容
     * @param inspetion
     * @return
     */
    int EditInspetion(Inspetion inspetion) throws SQLException;

    /**
     * 根据巡检id信息，更改巡检状态
     * @param task_id
     * @return
     */
    int ChangeCarrieState(String task_id) throws SQLException;

    /**
     * 添加缺陷内容
     * @param defect
     * @return
     */
    int Edit_CarriedInspe(Defect defect) throws SQLException;
}
